package org.utnrepasa.net.util;

import java.util.ArrayList;

/**
 * Representa un juego multijugador.
 *
 * @author Parisi Germán
 * @version 1.3
 */
public class MultiplayerGame extends Game {

	private static final long serialVersionUID = 1002;
	
    private ArrayList<Player> players;

    private Player playerTurn;

    public MultiplayerGame(int id, Player creator, int rounds, int questionsPerRound) {
        this(id, creator, rounds, questionsPerRound, STATE.WAITING);
    }

    public MultiplayerGame(int id, int rounds, int questionsPerRound) {
        this(id, null, rounds, questionsPerRound);
    }

    public MultiplayerGame(int id, Player creator, int rounds, int questionsPerRound, STATE state) {
        super(id, creator, rounds, questionsPerRound, state);
        this.players = new ArrayList<Player>();
        if (creator != null) {
            this.players.add(creator);
        }
    }

    public void addPlayer(Player player) {
        this.players.add(player);
    }

    public ArrayList<Player> getPlayers() {
        return this.players;
    }

    public Player getPlayerTurn() {
        return this.playerTurn;
    }

    public void setPlayers(ArrayList<Player> players) {
        this.players = players;
    }

    public void setPlayerTurn(Player playerTurn) {
        this.playerTurn = playerTurn;
    }
}
